#include <stdio.h>
#include <vector>
#include "FenwickTree.h"




int main() {


	vector<int> data;

	for ( int i = 0; i < 11; ++i ) {
		data.push_back(i);
	}

	for ( int i = 0; i < 11; ++i ) {
		printf("%d ", data[i] );
	}

	printf("\n");
	
	CFenwickTree tree(data);

	printf("Sum = %d\n",tree.Sum( 0, 10 ));
	

	tree.Set( 3, 10 );
	tree.Set( 7, 10 );
	printf("New Sum = %d\n",tree.Sum( 0, 10 ));

	getchar();
	return 0;
}